package com.dlc.shop.systemtest.api.amount;

import com.dlc.shop.bean.param.ScoreConfigParam;
import com.dlc.shop.systemtest.constants.Constant;
import com.dlc.shop.systemtest.util.HttpUtil;

/**
 * @author xxw
 * @date 2023/2/27 16:39
 */
public class ScoreConfigApi {

    /**
     * 获取配置信息
     * @param key
     * @return
     */
    public static ScoreConfigParam info(String key){
        String url = Constant.PLATFORM_URL+"/user/scoreConfig/info/"+key;
        return HttpUtil.get(url, ScoreConfigParam.class);
    }

    /**
     * 保存
     * @param scoreConfigParam
     */
    public static void save(ScoreConfigParam scoreConfigParam){
        String url = Constant.PLATFORM_URL+"/user/scoreConfig";
        HttpUtil.post(url, scoreConfigParam);
    }
}
